home *** CD-ROM | disk | FTP | other *** search
- *****************************************************************************
- * Example 2 of using the 'exsys.library' (using the supplied include file)
- * ---------------------------------------------------------------------------
- * This example setsup a level 3 interrupt using the REAL vectorbase address
- * (works with all MC680x0 cpu processors not just the MC68000 like many others
- * I`ve seen in the past which don`t use the vectorbase...
- *
- * NB: There is no need to save/restore interrupt vectors for interrupts, its
- * all done automatically for you by the library routines!!!!
- ******************************************************************************
-
- incdir 'work:Exsyslib/'
- include 'include/hardware/custom.i' ;define customchips
- include 'include/hardware/exsys_takeover.s' ;1st codeline!
-
- *-------------- Install a new copperlist..
-
- lea my_copper(pc),a0
- bsr.s newcopper
-
- *-------------- Install a new level 3 interrupt..
-
- lea my_interrupt(pc),a0 ;ptr to our interrupt..
- move.l _OSVBR(a4),a1 ;get VBR..
- move.l a0,$6c(a1) ;install interrupt..
-
- *-------------- wait for Left Mouse before exiting..
-
- test btst #6,$bfe001 ;exit on left mouse...
- bne.s test
- rts ;return to os..
-
- *****************************************************************************
- * Our shiny new level 3 in action..!
-
- my_interrupt: movem.l d0-d7/a0-a6,-(sp)
-
- move.w $dff006,$dff180 ;FLASH SCREEN!
-
- movem.l (sp)+,d0-d7/a0-a6
- move.w #$20,$dff09c ; clear request
- rte
-
- ******************************************************************************
- * Turn on a new copperlist
-
- newcopper: lea $dff000,a6 ;a6=custom hardware
- move.w #$7fff,$96(a6) ;no dma
- move.l a0,$80(a6) ;install new copperlist ptr
- clr.w $88(a6) ;strobe copper
- move.w #$83c0,$96(a6) ;enable copper dma
- rts
-
- *****************************************************************************
- * Our new copperlist...
-
- my_copper: dc.w diwstrt,$2c81,diwstop,$2cc1
- dc.w ddfstrt,$0038,ddfstop,$00d0
- dc.w bplcon0,$0200 ;no bitplanes
- dc.w $180,$000f ;color 0
- dc.l -2
-